package org.jetlinks.pro.dashboard;

import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

import java.util.List;
import java.util.Optional;

/**
 * 仪表盘接口
 *
 * @author zhouhao
 * @see DashboardObject
 * @since 1.0
 */
public interface Dashboard {

    /**
     * 获取仪表盘定义描述信息
     *
     * @return 描述信息
     */
    DashboardDefinition getDefinition();

    /**
     * 获取此仪表盘的所有对象
     *
     * @return 仪表盘对象
     */
    Flux<DashboardObject> getObjects();

    /**
     * 根据ID获取仪表盘对象
     *
     * @param id ID
     * @return 仪表盘对象
     */
    Mono<DashboardObject> getObject(String id);

}
